/*
 * 访客列表
 * @Author: ljb
 * @Date: 2018-04-20 17:38:08
 * @Last Modified by: kanglin
 * @Last Modified time: 2018-06-06 18:43:19
 */
<style lang="less" rel="stylesheet/less" type="text/less" scoped>

</style>
<template>
	<div class="v-home-customer-visit-index">

		<Table :columns="columns" border :loading="loading" :data="visits" height="350" />

	</div>
</template>

<script>

export default {
	name: 'VisitIndex',
	props: ['loading', 'visits'],
	data() {
		return {
			columns: [
				{
					title: '访问人',
					key: 'visitor_name',
					align: 'center',
					render: (h, { row }) => <div> { row.visitor_name || '-' } </div>,
				},
				{
					title: '访问店铺',
					key: 'host_name',
					align: 'center',
					render: (h, { row }) => <div> { row.host_name || '-' } </div>,
				},
				{
					title: '访问方式',
					key: 'description',
					align: 'center',
					render: (h, { row }) => <div> { row.description || '-' } </div>,
				},
				{
					title: '访问时间',
					key: 'created_at',
					align: 'center',
					render: (h, { row }) => <div> { row.created_at ? row.created_at.split(' ').shift() : '未知' } </div>,
				},
			],
		};
	},
	methods: {


	},
};
</script>
